<!DOCTYPE html>
<html>
<head>
    <title>My Sample Project</title>
    <!-- data-main attribute tells require.js to load
         scripts/main.js after require.js loads. -->
    <!--<script data-main="js/main" src="js/require.js"></script>-->
    <script src="js/index1.js" type="text/javascript"></script>
    <script src="js/index2.js" type="text/javascript"></script>
    <script type="text/javascript">
        // 立即执行函数
        // 外部代码无法读取内部的_count变量
        module1.m1();
        module1.m3();
        alert(module1._count);
        var mo = require('js/index1.js');
    </script>
</head>
<body>
<h1>My Sample Project</h1>
</body>
</html>